<template>
  <div>
    <el-tabs v-model="activeName" @tab-click="handleClick">
      <el-tab-pane label="全部" name="allUser">
        <allUser ref="allUser"/>
      </el-tab-pane>
      <el-tab-pane label="专项检测" name="typeCheck">
        <user ref="typeCheck"/>
      </el-tab-pane>
      <el-tab-pane label="综合检测" name="allCheck">
        <teacher ref="allCheck"/>
      </el-tab-pane>
      <el-tab-pane label="VR实训成绩" name="vrCheck">
        <vr-check ref="vrCheck"></vr-check>
      </el-tab-pane>
    </el-tabs>
  </div>
</template>

<script>
  import user from './typeCheck'
  import allUser from './allUser'
  import teacher from './allCheck'
  import vrCheck from './vrCheck'

  export default {
    components: { user, teacher,allUser,vrCheck },
    data() {
      return {
        activeName: 'allUser'
      }
    },
    methods: {
      handleClick(tab, event) {
        if(this.activeName==='typeCheck'){
          this.$refs.typeCheck.init()
        }else if(this.activeName==='allCheck'){
          this.$refs.allCheck.init()
        }else{

        }
      }
    }
  }
</script>
